package struts.form;

import org.apache.log4j.Logger;

import struts.action.Action;

/**
 * 
 * @author ily ActionFactory
 */
public class ActionFactory {

	private static final Logger logger = Logger.getLogger(ActionFactory.class);

	@SuppressWarnings("rawtypes")
	public static Action createAction(String actionClass) {
		logger.info("************** 装载" + actionClass + "!*************");
		Action action = null;
		try {
			Class clazz = Class.forName(actionClass);
			action = (Action) clazz.newInstance();

		} catch (Exception e) {
			logger.info("**************Action 装载失败!*************");
			logger.error(e);
		}
		return action;
	}
}
